/**
 * Copyright (c) 2015 Lenovo Group
 * All Rights Reserved.
 * 
 * Project Name:lmrp-api
 * Create Time: 2016年01月25日 上午10:28:39
 */
package com.lenovo.lmrp.api.model.entity;

import java.util.Date;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.EnumType;
import javax.persistence.Enumerated;
import javax.persistence.Id;
import javax.persistence.Table;

import com.lenovo.sdc.framework.util.IntegerValuedEnum;

/**
 * 
 * @author wujin
 */
@Entity
@Table(name="itsm_ticket_attachment")
public class AttachmentPO {
    public static enum AttachmentStatus implements IntegerValuedEnum {
        //0 - 待上传，1 - 上传中，2 - 已上传，3 - 同步到ITSM中，4 - 已同步到ITSM
        UNUPLOADED,
        UPLOADING,
        UPLOADED,
        SYNCING,
        SYNCED;

        @Override
        public int getCode() {
            return ordinal();
        }
    }
    
    public static enum AttachmentType implements IntegerValuedEnum {
        CUSTOMESIGN,
        OTHER,
        SCENE,
        TICKET,
        UPPARTS,
        DOWNPARTS,
        EVALUATION;
        
        @Override
        public int getCode() {
            return ordinal();
        }
    }
    
    @Id
    @Column
    private String id;
    
    @Column
    private String ticketId;
    
    @Column
    private String fileName;
    
    @Column
    private String originalPath;
    
    @Column
    private String storePath;
    
    @Column
    private Date createTime;
    
    @Column
    private Date updateTime;
    
    @Column
    private String cdnURL;
    
    @Column
    @Enumerated(EnumType.ORDINAL)
    private AttachmentStatus status;
    
    @Column
    private String submitter;
    
    @Column
    @Enumerated(EnumType.ORDINAL)
    private AttachmentType type;
    
    @Column
    private String tag;

    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    public String getTicketId() {
        return ticketId;
    }

    public void setTicketId(String ticketId) {
        this.ticketId = ticketId;
    }

    public String getFileName() {
        return fileName;
    }

    public void setFileName(String fileName) {
        this.fileName = fileName;
    }

    public String getOriginalPath() {
        return originalPath;
    }

    public void setOriginalPath(String originalPath) {
        this.originalPath = originalPath;
    }

    public String getStorePath() {
        return storePath;
    }

    public void setStorePath(String storePath) {
        this.storePath = storePath;
    }

    public Date getCreateTime() {
        return createTime;
    }

    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }

    public Date getUpdateTime() {
        return updateTime;
    }

    public void setUpdateTime(Date updateTime) {
        this.updateTime = updateTime;
    }

    public String getCdnURL() {
        return cdnURL;
    }

    public void setCdnURL(String cdnURL) {
        this.cdnURL = cdnURL;
    }

    public AttachmentStatus getStatus() {
        return status;
    }

    public void setStatus(AttachmentStatus status) {
        this.status = status;
    }

    public String getSubmitter() {
        return submitter;
    }

    public void setSubmitter(String submitter) {
        this.submitter = submitter;
    }

    public String getTag() {
        return tag;
    }

    public void setTag(String tag) {
        this.tag = tag;
    }

    public AttachmentType getType() {
        return type;
    }

    public void setType(AttachmentType type) {
        this.type = type;
    }
}
